import axios from 'axios';

const BASE_URL = 'http://localhost:8080'; // Spring Boot后端地址

export function getStudents(params) {
  return axios.get(`${BASE_URL}/student/filter`, { params });
}

export function addStudent(data) {
  return axios.post(`${BASE_URL}/student/add`, data);
}

export function updateStudent(data) {
  return axios.put(`${BASE_URL}/student/update`, data);
}

export function deleteStudent(id) {
  return axios.delete(`${BASE_URL}/student/delete/${id}`);
} 